#
# OMNeT++/OMNEST Makefile for tirt
#
# This file was generated with the command:
#  opp_makemake -f --deep -O out
#

# Name of target to be created (-o option)
TARGET = tirt$(EXE_SUFFIX)

# User interface (uncomment one) (-u option)
USERIF_LIBS = $(ALL_ENV_LIBS) # that is, $(TKENV_LIBS) $(CMDENV_LIBS)
#USERIF_LIBS = $(CMDENV_LIBS)
#USERIF_LIBS = $(TKENV_LIBS)

# C++ include paths (with -I)
INCLUDE_PATH = \
    -I. \
    -Isrc \
    -Isrc/admission \
    -Isrc/channels \
    -Isrc/forks \
    -Isrc/generators \
    -Isrc/packets \
    -Isrc/profilers \
    -Isrc/schedulers \
    -Isrc/sinks \
    -Itest \
    -Itest/admission \
    -Itest/admission/results \
    -Itest/general \
    -Itest/general/results \
    -Itest/generators \
    -Itest/generators/results \
    -Itest/profilers \
    -Itest/profilers/results \
    -Itest/schedulers \
    -Itest/schedulers/results

# Additional object and library files to link with
EXTRA_OBJS =

# Additional libraries (-L, -l options)
LIBS =

# Output directory
PROJECT_OUTPUT_DIR = out
PROJECTRELATIVE_PATH =
O = $(PROJECT_OUTPUT_DIR)/$(CONFIGNAME)/$(PROJECTRELATIVE_PATH)

# Object files for local .cc and .msg files
OBJS = \
    $O/src/admission/AbstractAdmissionControl.o \
    $O/src/admission/PriorityControlAdmissionControl.o \
    $O/src/admission/RateBasedAdmissionControl.o \
    $O/src/admission/SizeAdmissionControl.o \
    $O/src/admission/SrcAdmissionControl.o \
    $O/src/forks/DummyModule.o \
    $O/src/forks/RandomFork.o \
    $O/src/generators/AbstractGenerator.o \
    $O/src/generators/ExponentialGenerator.o \
    $O/src/generators/MarkovModulatedPoissonProcessGenerator.o \
    $O/src/generators/OnOffGenerator.o \
    $O/src/generators/PoissonGenerator.o \
    $O/src/profilers/AbstractProfiler.o \
    $O/src/profilers/JitterControlProfiler.o \
    $O/src/profilers/LeakyBucketProfiler.o \
    $O/src/profilers/LoadSheddingProfiler.o \
    $O/src/profilers/TokenBucketProfiler.o \
    $O/src/schedulers/AbstractScheduler.o \
    $O/src/schedulers/FcfsScheduler.o \
    $O/src/schedulers/LcfsScheduler.o \
    $O/src/schedulers/PriorityQueueScheduler.o \
    $O/src/schedulers/RoundRobinScheduler.o \
    $O/src/schedulers/WeightedRoundRobinScheduler.o \
    $O/src/sinks/SimpleSink.o \
    $O/src/packets/NetPacket_m.o

# Message files
MSGFILES = \
    src/packets/NetPacket.msg

#------------------------------------------------------------------------------

# Pull in OMNeT++ configuration (Makefile.inc or configuser.vc)

ifneq ("$(OMNETPP_CONFIGFILE)","")
CONFIGFILE = $(OMNETPP_CONFIGFILE)
else
ifneq ("$(OMNETPP_ROOT)","")
CONFIGFILE = $(OMNETPP_ROOT)/Makefile.inc
else
CONFIGFILE = $(shell opp_configfilepath)
endif
endif

ifeq ("$(wildcard $(CONFIGFILE))","")
$(error Config file '$(CONFIGFILE)' does not exist -- add the OMNeT++ bin directory to the path so that opp_configfilepath can be found, or set the OMNETPP_CONFIGFILE variable to point to Makefile.inc)
endif

include $(CONFIGFILE)

# Simulation kernel and user interface libraries
OMNETPP_LIB_SUBDIR = $(OMNETPP_LIB_DIR)/$(TOOLCHAIN_NAME)
OMNETPP_LIBS = -L"$(OMNETPP_LIB_SUBDIR)" -L"$(OMNETPP_LIB_DIR)" $(USERIF_LIBS) $(KERNEL_LIBS) $(SYS_LIBS)

COPTS = $(CFLAGS)  $(INCLUDE_PATH) -I$(OMNETPP_INCL_DIR)
MSGCOPTS = $(INCLUDE_PATH)

#------------------------------------------------------------------------------
# User-supplied makefile fragment(s)
# >>>
# <<<
#------------------------------------------------------------------------------

# Main target
all: $(TARGET)

$(TARGET) : $O/$(TARGET)
	$(LN) $O/$(TARGET) .

$O/$(TARGET): $(OBJS)  $(wildcard $(EXTRA_OBJS)) Makefile
	@$(MKPATH) $O
	$(CXX) $(LDFLAGS) -o $O/$(TARGET)  $(OBJS) $(EXTRA_OBJS) $(WHOLE_ARCHIVE_ON) $(LIBS) $(WHOLE_ARCHIVE_OFF) $(OMNETPP_LIBS)

.PHONY:

.SUFFIXES: .cc

$O/%.o: %.cc
	@$(MKPATH) $(dir $@)
	$(CXX) -c $(COPTS) -o $@ $<

%_m.cc %_m.h: %.msg
	$(MSGC) -s _m.cc $(MSGCOPTS) $?

msgheaders: $(MSGFILES:.msg=_m.h)

clean:
	-rm -rf $O
	-rm -f tirt tirt.exe libtirt.so libtirt.a libtirt.dll libtirt.dylib
	-rm -f ./*_m.cc ./*_m.h
	-rm -f src/*_m.cc src/*_m.h
	-rm -f src/admission/*_m.cc src/admission/*_m.h
	-rm -f src/channels/*_m.cc src/channels/*_m.h
	-rm -f src/forks/*_m.cc src/forks/*_m.h
	-rm -f src/generators/*_m.cc src/generators/*_m.h
	-rm -f src/packets/*_m.cc src/packets/*_m.h
	-rm -f src/profilers/*_m.cc src/profilers/*_m.h
	-rm -f src/schedulers/*_m.cc src/schedulers/*_m.h
	-rm -f src/sinks/*_m.cc src/sinks/*_m.h
	-rm -f test/*_m.cc test/*_m.h
	-rm -f test/admission/*_m.cc test/admission/*_m.h
	-rm -f test/admission/results/*_m.cc test/admission/results/*_m.h
	-rm -f test/general/*_m.cc test/general/*_m.h
	-rm -f test/general/results/*_m.cc test/general/results/*_m.h
	-rm -f test/generators/*_m.cc test/generators/*_m.h
	-rm -f test/generators/results/*_m.cc test/generators/results/*_m.h
	-rm -f test/profilers/*_m.cc test/profilers/*_m.h
	-rm -f test/profilers/results/*_m.cc test/profilers/results/*_m.h
	-rm -f test/schedulers/*_m.cc test/schedulers/*_m.h
	-rm -f test/schedulers/results/*_m.cc test/schedulers/results/*_m.h

cleanall: clean
	-rm -rf $(PROJECT_OUTPUT_DIR)

depend:
	$(MAKEDEPEND) $(INCLUDE_PATH) -f Makefile -P\$$O/ -- $(MSG_CC_FILES)  ./*.cc src/*.cc src/admission/*.cc src/channels/*.cc src/forks/*.cc src/generators/*.cc src/packets/*.cc src/profilers/*.cc src/schedulers/*.cc src/sinks/*.cc test/*.cc test/admission/*.cc test/admission/results/*.cc test/general/*.cc test/general/results/*.cc test/generators/*.cc test/generators/results/*.cc test/profilers/*.cc test/profilers/results/*.cc test/schedulers/*.cc test/schedulers/results/*.cc

# DO NOT DELETE THIS LINE -- make depend depends on it.
$O/src/admission/RateBasedAdmissionControl.o: src/admission/RateBasedAdmissionControl.cc \
	src/packets/NetPacket_m.h \
	src/admission/RateBasedAdmissionControl.h \
	src/admission/AbstractAdmissionControl.h
$O/src/admission/SizeAdmissionControl.o: src/admission/SizeAdmissionControl.cc \
	src/admission/SizeAdmissionControl.h \
	src/packets/NetPacket_m.h \
	src/admission/AbstractAdmissionControl.h
$O/src/admission/SrcAdmissionControl.o: src/admission/SrcAdmissionControl.cc \
	src/admission/SrcAdmissionControl.h \
	src/packets/NetPacket_m.h \
	src/admission/AbstractAdmissionControl.h
$O/src/admission/PriorityControlAdmissionControl.o: src/admission/PriorityControlAdmissionControl.cc \
	src/packets/NetPacket_m.h \
	src/admission/PriorityControlAdmissionControl.h \
	src/admission/AbstractAdmissionControl.h
$O/src/admission/AbstractAdmissionControl.o: src/admission/AbstractAdmissionControl.cc \
	src/packets/NetPacket_m.h \
	src/admission/AbstractAdmissionControl.h
$O/src/forks/RandomFork.o: src/forks/RandomFork.cc \
	src/forks/RandomFork.h
$O/src/forks/DummyModule.o: src/forks/DummyModule.cc \
	src/forks/DummyModule.h
$O/src/generators/OnOffGenerator.o: src/generators/OnOffGenerator.cc \
	src/packets/NetPacket_m.h \
	src/generators/OnOffGenerator.h \
	src/generators/AbstractGenerator.h
$O/src/generators/PoissonGenerator.o: src/generators/PoissonGenerator.cc \
	src/packets/NetPacket_m.h \
	src/generators/AbstractGenerator.h \
	src/generators/PoissonGenerator.h
$O/src/generators/MarkovModulatedPoissonProcessGenerator.o: src/generators/MarkovModulatedPoissonProcessGenerator.cc \
	src/packets/NetPacket_m.h \
	src/generators/MarkovModulatedPoissonProcessGenerator.h \
	src/generators/AbstractGenerator.h
$O/src/generators/AbstractGenerator.o: src/generators/AbstractGenerator.cc \
	src/packets/NetPacket_m.h \
	src/generators/AbstractGenerator.h
$O/src/generators/ExponentialGenerator.o: src/generators/ExponentialGenerator.cc \
	src/packets/NetPacket_m.h \
	src/generators/AbstractGenerator.h \
	src/generators/ExponentialGenerator.h
$O/src/packets/NetPacket_m.o: src/packets/NetPacket_m.cc \
	src/packets/NetPacket_m.h
$O/src/profilers/JitterControlProfiler.o: src/profilers/JitterControlProfiler.cc \
	src/packets/NetPacket_m.h \
	src/profilers/AbstractProfiler.h \
	src/profilers/JitterControlProfiler.h
$O/src/profilers/TokenBucketProfiler.o: src/profilers/TokenBucketProfiler.cc \
	src/profilers/TokenBucketProfiler.h \
	src/packets/NetPacket_m.h \
	src/profilers/AbstractProfiler.h
$O/src/profilers/LeakyBucketProfiler.o: src/profilers/LeakyBucketProfiler.cc \
	src/packets/NetPacket_m.h \
	src/profilers/AbstractProfiler.h \
	src/profilers/LeakyBucketProfiler.h
$O/src/profilers/LoadSheddingProfiler.o: src/profilers/LoadSheddingProfiler.cc \
	src/profilers/LoadSheddingProfiler.h \
	src/packets/NetPacket_m.h \
	src/profilers/AbstractProfiler.h
$O/src/profilers/AbstractProfiler.o: src/profilers/AbstractProfiler.cc \
	src/packets/NetPacket_m.h \
	src/profilers/AbstractProfiler.h
$O/src/schedulers/PriorityQueueScheduler.o: src/schedulers/PriorityQueueScheduler.cc
$O/src/schedulers/WeightedRoundRobinScheduler.o: src/schedulers/WeightedRoundRobinScheduler.cc \
	src/schedulers/WeightedRoundRobinScheduler.h
$O/src/schedulers/LcfsScheduler.o: src/schedulers/LcfsScheduler.cc
$O/src/schedulers/RoundRobinScheduler.o: src/schedulers/RoundRobinScheduler.cc
$O/src/schedulers/AbstractScheduler.o: src/schedulers/AbstractScheduler.cc
$O/src/schedulers/FcfsScheduler.o: src/schedulers/FcfsScheduler.cc
$O/src/sinks/SimpleSink.o: src/sinks/SimpleSink.cc \
	src/sinks/SimpleSink.h

